﻿<%@ Page Title="" Language="C#" MasterPageFile="CampusAgent.master" AutoEventWireup="true" CodeFile="AgentDefault.aspx.cs" Inherits="AgentDefault" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="AgentDefault.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        
        <asp:SqlDataSource ID="SqlDataSource_orderlist" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnString %>" 
                   
            SelectCommand="SELECT DISTINCT orderID AS 订单号, CASE orderstatus WHEN 0 THEN '已取消' WHEN 1 THEN '待确认' WHEN 2 THEN '已确认' WHEN 3 THEN '过期' ELSE '状态错误' END AS 订单状态, hotelname AS 宾馆名称, province AS 所在省份, city AS 城市, county AS [县/区], address AS 地址, telephonenumber AS 电话, starttime AS 预定开始时间, endtime AS 至, ordertime AS 下单时间 FROM AgentOrderView WHERE agentID=@agentID and  (orderstatus =1 or orderstatus=2) ORDER BY 下单时间 DESC">
                        <SelectParameters>
                            <asp:SessionParameter Name="agentID" SessionField="userId" />
                        </SelectParameters>
                    </asp:SqlDataSource>
        <asp:Label ID="Label1" runat="server" Font-Names="幼圆" Font-Size="18pt" 
            Text="最新订单列表"></asp:Label>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            DataSourceID="SqlDataSource_orderlist" CellPadding="8" ForeColor="#333333" 
            GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </div>
</asp:Content>

